class Vector:
    @classmethod
    def cin_(cls):
        x, y, z = input().split(',')
        return Vector(int(x), int(y), int(z))
    def __init__(self,x,y,z):
        self.x = x
        self.y = y
        self.z = z
    def __add__(self, other):
        return Vector(self.x + other.x,self.y + other.y,self.z + other.z)
    def __sub__(self, other):
        return Vector(self.x - other.x, self.y - other.y, self.z - other.z)
    def __str__(self):
        return f"({self.x}, {self.y}, {self.z})"
v1 = Vector.cin_()
v2 = Vector.cin_()
v3 = v1.__add__(v2)
v4 = v1.__sub__(v2)
print(f"{v1} + {v2} = {v3}")
print(f"{v1} - {v2} = {v4}")